/**
 * 
 */
package com.gr.experimental.model.impl.distr.operators;


/**
 * @author Karol Banczyk
 *
 */
public class LogicalNegationOperator implements UnaryOperator {

	/**
	 * {@inheritDoc}
	 * @see com.gr.experimental.model.impl.distr.operators.UnaryOperator#getArgumentType()
	 */
	@Override
	public Class<?> getArgumentType() {
		return Boolean.class;
	}

	/**
	 * {@inheritDoc}
	 * @see com.gr.experimental.model.impl.distr.operators.UnaryOperator#getReturnType()
	 */
	@Override
	public Class<?> getReturnType() {
		return Boolean.class;
	}

	/**
	 * {@inheritDoc}
	 * @see com.gr.experimental.model.impl.distr.operators.UnaryOperator#op(java.lang.Object)
	 */
	@Override
	public Object op(Object arg) {
		Boolean b = (Boolean) arg;
		return !b;
	}

}
